﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Text;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Genesis
{
    public partial class frmSettings : Form
    {
        InstalledFontCollection fonts = new InstalledFontCollection();

        public frmSettings()
        {
            InitializeComponent();
        }

        private void frmSettings_Load(object sender, EventArgs e)
        {
            
            // Load Scheme
            txtBG.Text = Visual_Settings.BackColor.Name;
            txtBG.BackColor = Visual_Settings.BackColor;
            txtBG.ForeColor = Visual_Settings.ForeColor;
            txtFC.Text = Visual_Settings.AltBackColor.Name;
            txtFC.BackColor = Visual_Settings.AltBackColor;
            txtFC.ForeColor = Visual_Settings.AltBackColor;
            txtTC.Text = Visual_Settings.ForeColor.Name;
            txtTC.BackColor = Visual_Settings.ForeColor;
            txtTC.ForeColor = Visual_Settings.ForeColor;            
        }

        private void cmdDefault_Click(object sender, EventArgs e)
        {
            // Load Scheme
            txtBG.Text = Visual_Settings.DefaultBackColor.Name;
            txtBG.BackColor = Visual_Settings.DefaultBackColor;
            txtBG.ForeColor = Visual_Settings.DefaultForeColor;
            txtFC.Text = Visual_Settings.DefaultAltBackColor.Name;
            txtFC.BackColor = Visual_Settings.DefaultAltBackColor;
            txtFC.ForeColor = Visual_Settings.DefaultAltBackColor;
            txtTC.Text = Visual_Settings.DefaultForeColor.Name;
            txtTC.BackColor = Visual_Settings.DefaultForeColor;
            txtTC.ForeColor = Visual_Settings.DefaultForeColor;

            // Apply Scheme
            Visual_Settings.DefaultSettings();
        }
        private void cmdOK_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;
        }

        private void cmdTextColor_Click(object sender, EventArgs e)
        {
            colorDialog.ShowDialog();
            Visual_Settings.ForeColor = colorDialog.Color;
            txtTC.Text = Visual_Settings.ForeColor.Name;
            txtTC.BackColor = Visual_Settings.ForeColor;
            txtTC.ForeColor = Visual_Settings.ForeColor;
        }
        private void cmdBG_Click(object sender, EventArgs e)
        {
            colorDialog.ShowDialog();
            Visual_Settings.BackColor = colorDialog.Color;
            txtBG.Text = Visual_Settings.BackColor.Name;
            txtBG.BackColor = Visual_Settings.BackColor;
            txtBG.ForeColor = Visual_Settings.BackColor;
        }
        private void cmdFC_Click(object sender, EventArgs e)
        {
            colorDialog.ShowDialog();
            Visual_Settings.AltBackColor = colorDialog.Color;
            txtFC.Text = Visual_Settings.AltBackColor.Name;
            txtFC.BackColor = Visual_Settings.AltBackColor;
            txtFC.ForeColor = Visual_Settings.AltBackColor;
        }
    }
}
